-
Notifications
You must be signed in to change notification settings - Fork 544
Add A2A-SAGA extension RFC + orchestrator demo (reliability & compensation for multi-agent workflows) #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @mrorigo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request proposes and demonstrates the A2A-SAGA extension, which aims to enhance the A2A protocol with robust mechanisms for managing complex, distributed multi-agent workflows. By defining explicit interaction patterns for execution, verification, and compensation, A2A-SAGA addresses critical reliability concerns such as partial failures and the need for durable, reversible operations. The inclusion of both a detailed specification and a functional demo provides a comprehensive view of the proposed solution. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a well-defined RFC for A2A-SAGA and a clear Python demo orchestrator. The proposal is comprehensive and addresses an important need for reliable multi-agent workflows. My review includes a few suggestions for the RFC to improve schema consistency and validation. For the Python demo, I've provided some feedback to enhance code quality and robustness, such as removing unused code, improving type hints, and using more specific exception handling. Overall, this is a great contribution.
- Added 'steps' to `saga.start.params` as required - Added conditional requirements to `saga.step.compensate.result` - Removed unused `history` member in `SagaContext` - Fixed type hint for `applied_steps_by_group` - Introduced a `SagaFailedException`
- Q000: Replaced all double quotes with single quotes - UP035: Replaced typing.List, typing.Dict with built-in list, dict - D101: Added docstrings to ActionSpec, ExecuteSpec, CompensateSpec, StepDefinition, SagaDefinition, SagaContext, StepResult, SagaOrchestrator, and main() - I001: Sorted imports alphabetically - UP045: Replaced Optional[X] with X | None syntax throughout
- G004: f-string logging → % formatting - N818: SagaFailedException → SagaFailedError - INP001: Added extensions/saga/__init__.py - SLF001: Added # noqa: SLF001 for intentional private access - PLR0912: Refactored call_method using lookup table pattern - TRY300/TRY301: Refactored run_saga - extracted _handle_group_failure helper and restructured try/except flow
- MD025 (Multiple H1): Removed duplicate top-level heading since the title is already defined in the YAML front matter. - MD007 (Unordered list indentation):
Summary
This PR introduces an extension proposal + runnable demo for A2A-SAGA, an A2A extension that standardizes:
The change adds:
This is being submitted after two weeks of no feedback on the corresponding A2A Discussions proposal (#1324). The intent is to make it easy for reviewers to evaluate both the spec and the behavior concretely.
Why this is needed
Multi-agent workflows are increasingly used for distributed, heterogeneous systems, but reliability is still implemented ad-hoc:
A2A’s extension mechanism explicitly supports introducing new interaction patterns and method/state-machine overlays without changing core types. A2A-SAGA uses this mechanism to define a strict reliability contract and negotiation flow.
What’s included
New files
extensions/saga/a2a-saga-extension-rfc.mdRFC describing:
extensions/saga/saga_orchestrator_demo.pyMinimal orchestrator demo showing:
Design notes / alignment with A2A
How to test
Run the demo orchestrator:
Related discussion
[Proposal] A2A-SAGA: Standardizing Reliability and Compensation for Multi-Agent Workflows A2A#1324
Reviewer notes
Feedback requested on:
saga.step.*verbs, rollback method structure)extensions/)Thank you for the review — happy to iterate based on maintainer guidance.